package com.xl.pojo.resp;

import lombok.Data;
import org.springframework.stereotype.Service;

import java.io.Serializable;

@Data
public class AlarmResp<T>  implements Serializable {

    private Integer code ;

    private String msg  ;

    private  T data ;


    public  AlarmResp  success(T data){
        this.code = 200 ;
        this.msg = "success";
        this.data = data ;
        return this ;
    }

    public  AlarmResp  error(){
        this.code = 450;
        this.msg = "error";
        return this ;
    }

}
